/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.mushroom.website.dao;


import cz.muni.fi.pa165.mushroom.website.entities.Gatherer;

import java.util.List;

/**
 * DAO interface for Gatherer entity
 * 
 * @author Roman Jakubco
 */
public interface GathererDao {
    
    /**
     * Adding Gatherer object into database
     * 
     * @param gatherer Gatherer to be created in DB
     * @return created Gatherer stored in database
     */
    public void createGatherer(Gatherer gatherer);
    
    /**
     * Updating specific gatherer in database
     * 
     * @param gatherer Gatherer to be updated
     * @return updated gatherer in database
     */
    public void updateGatherer(Gatherer gatherer);
    
    /**
     * Delete specific gatherer from database
     * 
     * @param gatherer gatherer to be deleted
     */
    public void removeGatherer(Gatherer gatherer);
    
    /**
     * Find specific gatherer in database
     * 
     * @param id id of gatherer to selecting
     * @return gatherer if exist else null
     */
    public Gatherer findGatherer(Long id);
    
    // only from memory TODO:
    
    /**
     * list all gatherers in database
     * 
     * @return List of gatherers from database
     */
    public List<Gatherer> listGatherers();
    
    
    /**
     * Method for finding gatherer by username
     * 
     * @param username username we are looking for
     * @return Gatherer with given username
     */
    public Gatherer findGathererByUsername(String username);
        
    
    
}
